<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline';"/>
    <meta name="viewport" content="width=device-width,initial-scale=1"/>
    <link rel="stylesheet" href="index.css">
    <title>AVR8js Electron PlayGround</title>
  </head>
  <body>
    <noscript>
      You need to enable JavaScript to run this app.
    </noscript>
    <div id="container" class="container">
      <div class="toolbar">
        <div class="zoom-header noselect">
          <button class="btn btn-dark zoomin"><i class="icon ci-plus2"></i></button>
          <select id="zoom-select" class="zoom-select" onchange="handleZoomChange()">
            <option value=0.5>50%</option>
            <option value=0.75>75%</option>
            <option value=0.85>85%</option>
            <option value=0.9>90%</option>
            <option value=1 selected>100%</option>
            <option value=1>Fit</option>
          </select>
          <button class="btn btn-dark zoomout"><i class="icon ci-less"></i></button>
        </div>
        <div class="spacer"></div>
        <button id="loadhex-button" class="btn btn-dark big"><i class="icon ci-upload"></i> Load HEX</button>
        <button id="compile-button" class="btn btn-dark"><i class="icon ci-upload"></i> Compile</button>
        <button id="run-button" class="btn btn-dark"><i class="icon ci-play-outline"></i> Run</button>
        <button id="stop-button" class="btn btn-dark" disabled><i class="icon ci-pause-outline"></i> Stop</button>
        <div class="spacer"></div>
        <div class="status">
          <span id="status-label">Simulation time: </span>
          <i class="icon ci-stopwatch"></i> <span id="status-label-timer" class="color-white">00:00.000</span>
          <i class="icon ci-timer"></i> <span id="status-label-speed" class="color-white">0%</span>
        </div>
      </div>
      <div class="parent">
        <div id="panel-left" class="child grid">
          <div id="project-tab" class="tab noselect"></div>
          <div id="elements" class="elements noselect"></div>
          <div id="matrix-component"></div>
        </div>
        <div id="panel-right" class="child">
          <div class="code-editor-container">
            <div id="editor-tab" class="tab noselect"></div>
            <div id="editor-container" class="code-editor"></div>
            <div class="toolbar">
              <button id="clear-button" class="btn btn-dark"><i class="icon ci-more"></i> Clear</button>
              <input id="file-input" type="file" name="name" class="hide" />
              <input id="serial-input" type="text" class="serial-input">&nbsp;
              <button id="serial-send" class="btn btn-dark"><i class="icon ci-download"></i> Send</button>
              <input id="serial-hidden" type="checkbox" class="serial-checkbox" checked>&nbsp;
              <div class="spacer"></div>
            </div>
            <div id="output-container" class="runner-output">
              <pre id="runner-output-text"></pre>
            </div>
          </div>
        </div>
      </div>
    </div>
    <script>
      require('./node_modules/@wokwi/elements/dist/wokwi-elements.bundle.min.js')
      require('./dist/app/editor.js')
      require('./dist/app/app.js')
      require('./dist/app/preload.js')
    </script>
    <!-- You can also require other files to run in this process -->
    <script src="./node_modules/monaco-editor/min/vs/loader.js"></script>
    <script>editorLoaded();</script>
  </body>
</html>
